<?php
namespace app\admin\controller\admin;
use app\admin\model\AdminLogs;
class Logs extends \app\admin\controller\admin\BaseAdmin{ 
    public function index(){
        //实例化管理员登录日志的类
        $admin_logs = new AdminLogs();
        //根据admin_id查询登录日志表中的登录状态
        $rows = $admin_logs->where('admin_id',$this->adminData->id)
                             ->order('id','desc')
                             ->paginate(5); 
        //把用户信息传递给模板
        $data['rows'] = $rows;
        return view('admin/logs',$data);
    }
}
